|
|
 |
|
|
|
|
For intLoop = 0 To .FontCount - 1
lstFonts.AddItem .Fonts(intLoop)
Next intLoop
End With
End Sub |
|
|
|
|
|
|
|
|
Using the FontCount property, you can determine how many fonts are installed on a particular machine. You can then use the Fonts property to add each individual font to the list box. |
|
|
|
|
|
|
|
|
Changing the Mouse Pointer |
|
|
|
|
|
|
|
|
When performing a long operation, youll need to inform the user that something is happening. One of the most common methods is to change the mouse pointer to an hourglass icon. You can accomplish this by setting the MousePointer property of the Screen object. Heres some sample code showing the use of the built-in constants for setting the appropriate cursor: |
|
|
|
 |
|
|
|
|
Screen.MousePointer = vbHourglass
...
...
Screen.MousePointer = vbDefault |
|
|
|
|
|
|
|
|
You have 17 different cursors available to you in the Visual Basic environment. Table 21.5 shows you the different settings and the constants that should be used to set each one. |
|
|
|
|
| Table 21.5 Cursor Types. | | Value to Set | Description | Constant Name | | 0 | Default | vbDefault | | 1 | Arrow | vbArrow | | 2 | Cross hair | vbCrosshair | | 3 | I-beam | vbIbeam | | 4 | Icon | vbIconPointer | | 5 | Sizing | vbSizePointer | | 6 | Sizing (NE, SW) | vbSizeNESW | | 7 | Sizing (N, S) | vbSizeNS |
|
|
|
|
|
|
(table continued on next page) |
|
|
|
|
|